#pragma once
#include "pch.h"
#include "framework.h"
#include "afxdialogex.h"

class Tools {
public:
	typedef struct paramdata {
		long param1;
		long param2;
		DWORD param3;
		DWORD param4;
	}paramdata, * paramp;
	// 将某个值写入植物大战僵尸内存（后面的可变参数是地址链，要以-1结尾）
	void WriteMemory(HANDLE& g_processHandle, void* value, DWORD valueSize, ...);

	void WriteMemory(HANDLE& g_processHandle, void* value, DWORD valueSize, DWORD address);

	void ChangeMemory(HANDLE& g_processHandle, CButton& button, DWORD address, void* value_orign, void* value_change, DWORD valueSize);

	void Tools::DoFunc(HANDLE& pid, void* funcptr, Tools::paramdata pdata);

	void AllocMemory(HANDLE& pid, BOOL mkeycode);
};
